package com.hopoke.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
//@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum UserStateEnum {

    NORMAL(1, "正常"),

    FREEZE(0, "冻结");

    @EnumValue
    @JsonValue
    private final Integer value;
    private final String desc;

    public boolean equalsValue(Integer value){
        if (value == null) {
            return false;
        }
        return getValue() == value;
    }

}
